{% extends "paster_main.html" %}

{% load highlight %}
{% load url from future %}

{% block paster_content %}
		<div class="paster_paste">
			<div class="input_container">
			    Search:<form method="get" action="{% url "modules.paster.views.index" %}search">{{ form.q }}</form>
		    </div>
		</div>


        {% if query %}
            <div class="results">Results</div>

            {% for paste in page.object_list %}
				<div class="paster_paste">
				<div class="paster_paste_title"><a href="{% url "modules.paster.views.index" %}{{ paste.hash }}">{% highlight paste.title with query max_length 1000000 %}</a></div>
				<div class="paster_paste_date">{{ paste.timestamp }}</div>
				<div class="paster_paste_navigation">
					<ul>
						<li>[</li>
						<li><a href="{% url "modules.paster.views.index" %}{{ paste.hash }}">link</a></li>
						<li>&#149;</li>
						<li><a href="{% url "modules.paster.views.index" %}raw/{{ paste.hash }}">raw</a></li>
						<li>&#149;</li>
						<li><a href="{% url "modules.paster.views.index" %}download/{{ paste.hash }}">download</a></li>
						<li>]</li>
					</ul>
				</div>
				<div class="paster_paste_data clearfix"><pre>{% highlight paste.data with query max_length 1000000 %}</pre></div>
			</div>
            {% empty %}
				<div class="paster_paste">
	                <div class="paster_paste_data"><pre>No results found.</pre></div>
                </div>
            {% endfor %}
        {% endif %}
{% endblock %}